package cn.cvs.service.impl;

import cn.cvs.dao.SysUserMapper;
import cn.cvs.pojo.Role;
import cn.cvs.pojo.SysUser;
import cn.cvs.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysUserServiceImpl implements SysUserService {
    @Override
    public int addRole(Role role) {
        return sysUserMapper.addRole(role);
    }

    @Override
    public int updateSupplier(Integer id, String supName) {
        return sysUserMapper.updateSupplier(id, supName);
    }

    @Override
    public int deleteSupplier(Integer id) {
        return sysUserMapper.deleteSupplier(id);
    }

    @Override
    public int updateRole(Integer id, String roleName) {
        return sysUserMapper.updateRole(id, roleName);
    }

    @Override
    public int deleteRole(Integer id) {
        return sysUserMapper.deleteRole(id);
    }

    @Override
    public List<Role> selectRole(String roleName) {
        return sysUserMapper.selectRole(roleName);
    }

    @Autowired
    private SysUserMapper sysUserMapper;

    @Override
    public List<SysUser> selectSysUserList(SysUser sysUser) {
        return sysUserMapper.selectSysUserList(sysUser);
    }
}
